package com.lucker.ds.model;

import java.util.Date;

/**
 * cai_piao
 * @author 
 */
public class CaiPiao extends BaseValueObject {
    private Long id;

    private Integer caiId;

    /**
     * 彩票名称
     */
    private String caiName;

    /**
     * 彩票所属分类
     */
    private String caiTypeId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 该彩票种类所属地域ID
     */
    private String domainId;

    /**
     * 该彩票种类所属地域名称
     */
    private String domainName;

    private Integer issueCount;

    private String firstIssueTime;

    private String extend2;

    private String extend3;

    private String customQuerySqlText = null;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getCaiId() {
        return caiId;
    }

    public void setCaiId(Integer caiId) {
        this.caiId = caiId;
    }

    public String getCaiName() {
        return caiName;
    }

    public void setCaiName(String caiName) {
        this.caiName = caiName;
    }

    public String getCaiTypeId() {
        return caiTypeId;
    }

    public void setCaiTypeId(String caiTypeId) {
        this.caiTypeId = caiTypeId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getDomainId() {
        return domainId;
    }

    public void setDomainId(String domainId) {
        this.domainId = domainId;
    }

    public String getDomainName() {
        return domainName;
    }

    public void setDomainName(String domainName) {
        this.domainName = domainName;
    }

    public Integer getIssueCount() {
        return issueCount;
    }

    public void setIssueCount(Integer issueCount) {
        this.issueCount = issueCount;
    }

    public String getFirstIssueTime() {
        return firstIssueTime;
    }

    public void setFirstIssueTime(String firstIssueTime) {
        this.firstIssueTime = firstIssueTime;
    }

    public String getExtend2() {
        return extend2;
    }

    public void setExtend2(String extend2) {
        this.extend2 = extend2;
    }

    public String getExtend3() {
        return extend3;
    }

    public void setExtend3(String extend3) {
        this.extend3 = extend3;
    }

    public void setCustomQuerySqlText(String customQuerySqlText) {
        this.customQuerySqlText = customQuerySqlText;
    }

    public String getCustomQuerySqlText() {
        return customQuerySqlText;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByCaiId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by cai_id asc";
            }else{
                this.orderStr = this.orderStr + ",cai_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by cai_id desc";
            }else{
                this.orderStr = this.orderStr + ",cai_id desc";
            }
        }
    }

    public void orderByCaiName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by cai_name asc";
            }else{
                this.orderStr = this.orderStr + ",cai_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by cai_name desc";
            }else{
                this.orderStr = this.orderStr + ",cai_name desc";
            }
        }
    }

    public void orderByCaiTypeId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by cai_type_id asc";
            }else{
                this.orderStr = this.orderStr + ",cai_type_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by cai_type_id desc";
            }else{
                this.orderStr = this.orderStr + ",cai_type_id desc";
            }
        }
    }

    public void orderByCreateTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by create_time asc";
            }else{
                this.orderStr = this.orderStr + ",create_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by create_time desc";
            }else{
                this.orderStr = this.orderStr + ",create_time desc";
            }
        }
    }

    public void orderByUpdateTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by update_time asc";
            }else{
                this.orderStr = this.orderStr + ",update_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by update_time desc";
            }else{
                this.orderStr = this.orderStr + ",update_time desc";
            }
        }
    }

    public void orderByDomainId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by domain_id asc";
            }else{
                this.orderStr = this.orderStr + ",domain_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by domain_id desc";
            }else{
                this.orderStr = this.orderStr + ",domain_id desc";
            }
        }
    }

    public void orderByDomainName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by domain_name asc";
            }else{
                this.orderStr = this.orderStr + ",domain_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by domain_name desc";
            }else{
                this.orderStr = this.orderStr + ",domain_name desc";
            }
        }
    }

    public void orderByIssueCount(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by issue_count asc";
            }else{
                this.orderStr = this.orderStr + ",issue_count asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by issue_count desc";
            }else{
                this.orderStr = this.orderStr + ",issue_count desc";
            }
        }
    }

    public void orderByFirstIssueTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by first_issue_time asc";
            }else{
                this.orderStr = this.orderStr + ",first_issue_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by first_issue_time desc";
            }else{
                this.orderStr = this.orderStr + ",first_issue_time desc";
            }
        }
    }

    public void orderByExtend2(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend2 asc";
            }else{
                this.orderStr = this.orderStr + ",extend2 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend2 desc";
            }else{
                this.orderStr = this.orderStr + ",extend2 desc";
            }
        }
    }

    public void orderByExtend3(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend3 asc";
            }else{
                this.orderStr = this.orderStr + ",extend3 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend3 desc";
            }else{
                this.orderStr = this.orderStr + ",extend3 desc";
            }
        }
    }
}